<%@ page contentType="text/html;charset=UTF-8" %>
		<div class="lightmaintit"><strong>轮播组件</strong></div>
		<div class="addtext_table">
		<table class="lighttablea" cellspacing="1">
			<tbody>
				 <tr>
					<th>组件ID</th>
					<td style="width:300px;"><input name="id" type="text" class="template-arg" /></td>
					<td rowspan="5" valign="top">
						<span> 栏目树：</span>
						<div id='cat_tree' class='ztree' style="overflow-y:auto;overflow-x:auto;height:120px;">
							   
					    </div>
					</td>
				</tr>
				<tr>
					<th>栏目图片内容</th>
					<td style="width:300px;"><input name="catIds" type="text" class="template-arg" id="component_page_parameter_cat_ids" readonly /></td>
					
				</tr>
				<tr>
					<th>组件宽度</th>
					<td style="width:300px;"><input name="width" type="text" class="template-arg" onkeydown="this.value=this.value.replace(/\D/g,'')" onchange="this.value=this.value.replace(/\D/g,'')"/><span style="color:red">(数字)</span></td>
					
				</tr>
				<tr>
					<th>组件高度</th>
					<td style="width:300px;"><input name="height" type="text" class="template-arg" onkeydown="this.value=this.value.replace(/\D/g,'')" onchange="this.value=this.value.replace(/\D/g,'')"/><span style="color:red">(数字)</span></td>
				</tr> 
				<tr>
					<th>间隔时间</th>
					<td style="width:300px;"><input name="interval" type="text" class="template-arg" onkeydown="this.value=this.value.replace(/\D/g,'')" onchange="this.value=this.value.replace(/\D/g,'')"/><span style="color:red">(数字:s)</span></td>
				</tr> 
				 
				<tr>
					<th>是否打开新页面</th> 
					  <td style="width:300px;">
					  	<s:radio list="#{1:'是',0:'否'}"  name="selectList" listKey="key" listValue="value" cssStyle="margin:0 0 0 10px"/>
					  	<input name="target" id ="target_arg" type="text" class="template-arg" style="display:none"/>
					  </td> 
					  <td rowspan="5" valign="top">	
						 <span> 专题树：</span>						
					 	<div id="topic_tree" class='ztree' style="overflow-y:auto;overflow-x:auto;height:120px;">
					 	</div>
					 </td>
				</tr>
				<tr>
					<th>主播内容</th>
					<td style="width:300px;"><input name="ads" id="adsId" type="text" class="template-arg" /></td>
				</tr>
				<tr>
					<th>轮播广告</th>
					<td style="width:300px;"><input name="adIds" type="text" class="template-arg" /></td>
				</tr>
				<tr>
					<th>内容数量</th>
					<td style="width:300px;"><input name="size" type="text" class="template-arg" /></td>
				</tr>
				<tr>
					<th>专题图片内容</th>
					<td style="width:300px;"><input name="topicIds" id="component_page_parameter_topic_ids" type="text" class="template-arg" readonly/></td>
					
				</tr>
				
			</tbody>
		</table>
		</div>
		<div class="lightbtnbox">
			<input type="button" value="参数确认" id="confirm_parameter" class="btnlist2" />
			<input type="button" value="参数重置" id="reset_parameter" class="btnlist2" />
			<input type="button" class="insertcode" value="插入代码" id="code_insert_btn"/>
		</div>
		<script type="text/javascript">
			var arr = new Array();
			$.ajax({
				url:"${ctx}/site/site-loadalltopic.action?t="+new Date().getTime() ,
				type:"get",
				dataType:"html",
				success:function(data){
					$("#site_tree").html(data);
					$("input:checkbox[name='pop_site_name']").click(function(){
						$("input[name='pop_site_name']:checked").each(function(){
							var s = $(this).val();
							arr.push(s);
						});
						var str = arr.join(",");
						$("#component_page_parameter_site_ids").val(str);
						arr.splice(0, arr.length);
					});
				}
			});
			 $("input:radio[name='selectList']").each(function(i,item){
				 $(item).click(function(){
					 if($(item).attr("checked")==true){
						 var v = $(item).val();
						 $("#target_arg").val(v);
					 }					 
				 });
			 });
			 
		</script>
		
	 <script type="text/javascript">
	 $(function(){
	 	loadCatetree (true,false,'cat_tree',setting_checkbox,true);
	 	loadTopictree ('topic_tree');
	 });
	 </script>